Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-types/select

Package Overview
Dependencies
Maintainers
2
Versions
805
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-types/select

Spectrum UI components in React

  • 3.9.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
894K
decreased by-16.6%
Maintainers
2
Weekly downloads
 
Created

What is @react-types/select?

@react-types/select is a TypeScript type definitions package for the React Spectrum Select component. It provides type definitions for building accessible and customizable select components in React applications.

What are @react-types/select's main functionalities?

SelectProps

Defines the properties for a Select component, including label, items, and onSelectionChange handler.

import { SelectProps } from '@react-types/select';

const selectProps: SelectProps<string> = {
  label: 'Choose an option',
  items: [{ name: 'Option 1' }, { name: 'Option 2' }],
  onSelectionChange: (key) => console.log(key)
};

Item

Defines individual items within the Select component.

import { Item } from '@react-types/select';

const items = [
  <Item key="1">Option 1</Item>,
  <Item key="2">Option 2</Item>
];

Section

Defines sections within the Select component to group related items.

import { Section } from '@react-types/select';

const sections = [
  <Section title="Group 1">
    <Item key="1">Option 1</Item>
    <Item key="2">Option 2</Item>
  </Section>,
  <Section title="Group 2">
    <Item key="3">Option 3</Item>
    <Item key="4">Option 4</Item>
  </Section>
];

Other packages similar to @react-types/select

FAQs

Package last updated on 01 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc